
export const isLocal = () => {
  return process.env.NODE_ENV !== 'production';
};

export const findGameApp = (model) => {

  if (model.parent.isRoot) {
    return model.parent;
  }

  return findGameApp(model.parent);

};

export const throttle = (method, delay) => {
  if (this.throttle) {
    return null;
  }

  this.throttle = setTimeout(() => {
    this.throttle = null;
    method();
  }, delay);

};

